/*
 * Copyright (c) 2019. Mikes. All rights reserved.
 *
 * You can contact me with sending email to bWlrZXNfMjAxMkAxNjMuY29t for more information!
 */

package com.climber.android.commonres.entity

import com.google.gson.annotations.SerializedName

/**
 * Created by Mikes at 2019-11-04 08:48
 */

/**
 * 当前用户数据信息
 */
class UserInfo {
    var nick_name: String? = null               // 用户昵称
    var sex: Int? = null                        // 用户性别       性别：1，男；2，女；3，保密
    var birthday: String? = null                // 用户生日
    var avatar: String? = null                  // 用户头像
    var signature: String? = null               // 用户签名
}

fun UserInfo.getSexInfo() : String {
    return when (sex) {
        1 -> "男"
        2 -> "女"
        3 -> "保密"
        else -> ""
    }
}

fun UserInfo.isMale() : Boolean = sex == 1

fun UserInfo.isFemale() : Boolean = sex == 2

/**
 * 用户信息 模型
 */
class IncUserInfo{
    // 用户资料卡数据信息
    var userInfo: UserInfo? = null
    // 用户ID
    var user_id: String? = null
}